<template>
    <div class="carousel">
      <el-carousel trigger="click" height="300px">
        <el-carousel-item v-for="item in 4" :key="item">
          <!-- <h3 class="small justify-center" text="2xl">{{ item }}</h3> -->
          <el-image v-if="item < 4" style="width: 667px; height: 300px" :src="baseUrl+imgUrl[item-1]" fit="fill" />
          <div v-else class="bulletin">
            <span class="bulletin-title">{{ bulletin.title }}</span>
            <span class="bulletin-content">{{ bulletin.content }}</span>
          </div>
        </el-carousel-item>
      </el-carousel>
    </div>
</template>

<script lang="ts" setup>
import { ref, reactive, } from "vue"

const baseUrl = 'http://127.0.0.1:3000'
const bulletin = {
  title: "公告标题",
  content: "公告内容",
  uid: "发布者id",
}
const imgUrl = [
  '\\uploads\\images\\lunBoMap-image\\轮播图4.webp',
  '\\uploads\\images\\lunBoMap-image\\轮播图5.webp',
  '\\uploads\\images\\lunBoMap-image\\轮播图6.webp',
]


</script>

<style lang="less" scoped>
      .carousel {

.demonstration {
  color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

}
</style>

<style lang="less">
.bulletin {
  width: 100%;
  height: 100%;
  background-color: #fff;
  &-title {
    display: block;
    text-align: center;
    font-weight: 700;
    font-size: 22px;
  }
  &-content {
    padding-top: 10px;
  }
}
</style>